<html>
<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@include file="/quick/include/common.jsp"%>

  <head>
    <title>学生评教过程控制</title>
  </head>
  
    <c:if test="${not empty message}">
      <div  align="left" id="title" style="height:40px;vertical-align:bottom;bgcolor:blue;"><br><h3><STRONG><c:out value='${message}'/></STRONG></h3></div>
    </c:if>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<div id='c_init' align=center>
<font size=6><b><div align=center>学生评教过程控制</div></b></font>
  <table width="100%"  border="0" align="center" class="mainTable" >
    <tr>
      <td background="<c:url value='/images/table_title.jpg'/>"><b>数据初始化<font color="#FF0000"></font></b></td>
    </tr>
    <tr>
      <td><input name="xspj_init" type="checkbox" id="xspj_init" value="checkbox" onclick="f_preEvtInit(this)">
  学生评教
  <input name="init" type="button" id="c_init_btn" value="初始化学生评教" onClick="f_evtInit()" class="INPUT_button" disabled>
    <span class="style1">（如果要进行初始化，请先选中）</span></td>
    </tr>

    <tr>
      <td><span class="style1">(请在关闭学生评教的情况下进行初始化，请不要重复初始化，这将删除本学期的评教信息！)      </span></td>
    </tr>
    <tr>
      <td height="20" background="<c:url value='/images/table_title.jpg'/>"><b>学生评教开关</b><font color="#FF0000"></font></td>
    </tr>
    <tr>
      <td>
      学生评教当前状态：
      <c:if test="${model.evtStudentSwitch=='Y' }">
	       <b>开放</b>，您可以
	       <input name="open" type="button" id="open" value="关闭评教" onClick="f_evtSwitch('N')" class="INPUT_button">
      </c:if>
      <c:if test="${model.evtStudentSwitch=='N' }">
	       <b>关闭</b>，您可以
	       <input name="open" type="button" id="open" value="开放评教" onClick="f_evtSwitch('Y')" class="INPUT_button">
      </c:if>
     </td>
    </tr>

    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td background="<c:url value='/images/table_title.jpg'/>"><b>数据处理</b></td>
    </tr>
    <tr>
      <td>        <input name="xspj_deal" type="button" id="xspj_deal" value="学生评教数据处理" onClick="f_statistic()" class="INPUT_button" >      </td>
    </tr>
    <tr>
      <td><span class="style1">注：数据处理需要花几分钟的时间，请您耐心等待！</span></td>
    </tr>
  </table>
<br>
<br>
<font color=red><span id="infor"></span></font>
</div>
<script>
function f_evtSwitch(evtSwitch){
  var matrix=[["evtSwitch",evtSwitch],["command","evt_student_switch"]];
  var form=createForm("<c:url value='/evaluation/evt/student/evtStudentController.html'/>",matrix);
  form.submit();
}

function f_preEvtInit(box){
  var btn=Ext.get('c_init_btn').dom;
  btn.disabled=!(box.checked);
}

function f_evtInit(){
  var b=confirm('初始化学生评教，将删除本学期的已有评教信息，确认吗？');
  if(!b) return;
  var matrix=[["command","evt_student_init"]];
  var form=createForm("<c:url value='/evaluation/evt/student/evtStudentController.html'/>",matrix);
  form.submit();
  
}

function f_statistic(){
  var matrix=[["command","evt_student_deal"]];
  var form=createForm("<c:url value='/evaluation/evt/student/evtStudentController.html'/>",matrix);
  Ext.get("infor").dom.innerText="正在处理，请稍候……";
  form.submit();
}
</script>
  

</html>   
